package VN.EDU.IMIC.DEVELOPER.NGUYENVANTHIEN.ARRAY.BAI1;

public class Model {
	public double DiemTB(int List[]){
		double Tb = 0,tam = 0;
		for(int i=0;i<List.length;i++){
			tam = tam + List[i];
			Tb = tam/i;
		}
		return Tb;
	}

	public int PhanTichDiemMin(int List[]) {
		double TB = 0, tam = 0;
		int count = 0;
		for (int i = 0; i < List.length; i++) {
			tam = tam + List[i];
			TB = (double) tam / i;
			if (List[i] <= TB) {
				count++;
			}
		}
		return count;
	}

	public int PhanTichDiemMax(int List[]) {
		int count = 0;
		double TB = 0, tam = 0;
		for (int i = 0; i < List.length; i++) {
			tam = tam + List[i];
			TB = (double) tam / i;
			if (List[i] > TB) {
				count++;
			}
		}
		return count;
	}
}
